from pydantic import BaseModel, typing
from fastapi import Body
from typing import Annotated


class UserRequestBody(BaseModel):
    nickname: Annotated[str, Body(description="Никнейм", min_length=4, max_length=32)]
    email: Annotated[str, Body(description="Почтовый адрес", example="some_email@mail.asu.ru")]
    password: Annotated[str, Body(description="Пароль", min_length=4, max_length=32)]


class ResponsePattern(BaseModel):
    success: Annotated[bool, Body(description="Успех выполнения запроса")] = False
    result: Annotated[typing.Any, Body(description="Результат выполнения запроса")] = None
    error: Annotated[str, Body(description="Описание ошибки выполнения запроса")] = ""
